﻿using System;
using System.Globalization;
using DTO;
using System.Web.UI.WebControls;
using System.Web.UI.HtmlControls;
using System.Text;
using System.IO;
using System.Reflection;

public partial class Master : System.Web.UI.MasterPage
{
    public Permissao Usuario
    {
        get { return Session["usuario"] != null ? (Permissao)Session["usuario"] : Permissao.None; }
    }

    protected void Page_Load(object sender, EventArgs e)
    {
        lblAdmin.Visible = Usuario == Permissao.Admin;
        liAdmin.Visible = Usuario == Permissao.Admin;
        //container.Style["background-color"] = Usuario == Permissao.Admin ? "#Fdfdfd": "#fff";
    }


    public void Page_Error(object sender, EventArgs e)
    {
        Exception ex = Server.GetLastError().GetBaseException();

        Log.Write(ex, string.Empty);
    }
}